Troubleshooting: Statistics

Issues

A variable does not appear in my results

I get unrealistic values of path shape and direction

A subject shows rotational behavior. However, when I look at the stats of Angular velocity or Turn Angle, the values are lower than for a subject which does not show rotation. Why?

I get different results in two EthoVision XT versions

I get different results when I analyze the same video twice

I want to validate angle variables like Heading, Head direction, and Heading to Point, but the average value I calculate in Excel does not match the results in EthoVision XT

The total distance moved does not always match the mean velocity

I want to analyze Activity to detect freezing in rodents. However, when I plot the data I get lots of Inactive states

I get wrong statistics of manually-scored behaviors

The statistics result table contains many empty rows or columns

The statistics result table contains two or more values of a dependent variable for the same trial, arena or subject

The statistics result table does not appear

The Data Preparation Report says “Failed” for some trials

The percentage of “Subject not found” does not match the time in the arena

The results table contains “?” in many cells

How do I know the time between the starting point of a video and the time that I started tracking?

I get more zone entries than expected

The Analysis profile does not list Mobility and Head direction

 

A variable does not appear in my results

One or more of the following may the case:

The experiment is not set to Nose-point, center-point and tail-base point tracking.

You do not have the add-on module that allows to calculate those variables.

For social behavior variables: double-click a variable in the Analysis Profile and define Receivers there.

Your experiment is set to Live Mouse Tracker. This type of experiment does not contain the raw data needed to calculate variables like Mobility, Head direction and Body elongation.

See also

Dependent variables in detail: Social

I get unrealistic values of path shape and direction

Variables like Meander may have very high values (e.g. 5000 º/min) despite the fact that the animal moves approximately on a straight line. High values of the variable occur when body points for consecutive samples (that is, at times t-1, t, t+1...) lie near each other. For example, when the sample rate is high, and the subject does not move much, the distance moved between consecutive samples is very small, consequently Meander (which is by definition Turn angle divided by Distance moved) will be very high.

In this case it is useful to filter data using the Minimal Distance Moved method.

To choose the threshold, plot the data of Distance moved together with your variable. For example, if you see that values of Distance moved around 0.05 produce unrealistic values of the variable, set Minimal Distance Moved = 0.1.

If this does not fix the problem, try re-tracking from the same video, but with a lower sample rate.

See also

Dependent Variables in Detail > Path

The Minimal Distance Moved smoothing method

A subject shows rotational behavior. However, when I look at the stats of Angular velocity or Turn Angle, the values are lower than for a subject which does not show rotation. Why?

Angular velocity does not necessarily correlate with rotations. If the animal turns slowly, its Angular velocity is low. Furthermore, when the subject sits still, but its body point oscillates in all directions due to random noise, high values of Turn angle (and therefore Angular velocity) will appear. To minimize this effect, either use the Minimal Distance Moved filter (see the previous issue), or nest over Movement to only select the data points when the animal is Moving. Then, calculate your variables. The figure below compares Angular velocity calculated for when the animal moves significantly, with when it does not move.

inset_201220.jpg 

To quantify rotational behavior, also use Rotation.

I get different results in two EthoVision XT versions

The possible causes of this issue are:

You specified a sample rate that is lower than the maximum sample rate; in that case EthoVision XT analyzes every nth video frame (where n is the video frame rate/your sample rate; for example if you choose a sample rate of 12.5 for a video file of 25 frames per second, then n =2, that is, the software analyzes every two frames). In some previous versions, EthoVision XT always took the second frame in the video and every nth frame thereafter. The results like distance moved may be slightly different, but that is very unlikely to affect the outcome of an experiment.

EthoVision XT 17.5 and later play video using the GPU by default. In contrast, EthoVision XT 17.0 and earlier used the CPU. This may result in slight differences in the appearance of the video image, for example, video looking brighter, which in turn could affect detection and the tracking results. You have two options:

Revert to playback with the CPU in the Preferences for video settings.

Keep using the GPU and adjust the detection settings in the new version so they match the detection in the old version as much as possible.

I get different results when I analyze the same video twice

There may be a few reasons for this to happen.

Reason 1 - The effect of the reference image. When you use the detection methods Dynamic Subtraction or Differencing, the image used as reference may differ between trials even when you use exactly the same detection settings. The effect is more pronounced when you use Differencing.

If you position the video file at different times (thus at different frames) then you go back to the beginning and start the trial, the reference image may be different in the two trials. This will cause the track to differ slightly between the trials.

If you choose to use the dynamic reference image instead of the saved reference image at the start of each trial in a series (see The reference image) then the reference image with which trial 2 starts may not be exactly the same as the one at the start of trial 1. The difference may be of one or few more pixels brighter or darker, but still that difference has an effect.

To ensure that you use a consistent reference image, duplicate the Detection Settings and under Advanced select Background > under Acquisition Settings select Use saved reference image or Use first frame of each trial. This way at the start of each trial the same reference image is used. See The reference image

Reason 2 - Missing samples can affect the track duration. This happens especially if the missing samples happen to occur just when trial control start or stop conditions are evaluated.

Reason 3 - In multi-subject tracking doe with Deep learning, the results are not entirely repeatable due to the non-deterministic nature of the algorithm. Note that this occurs when you select to track two subjects in the arena, not just one. See Troubleshooting: Deep learning > The results of two-subject tracking are not consistent when using the same video

Concluding, to improve the consistency between trials:

Start both trials at the beginning of the video file, without positioning the video on any frame in the middle.

Improve the subjects’ detection to reduce the number of missing samples.

Use Gray Scaling or Static Subtraction (if possible). If you use Differencing or Dynamic Subtraction, choose to use a fixed reference image. See The reference image

To smooth out the tracks and remove outliers, apply the Lowess smoothing to the tracks. See The Lowess smoothing method

I want to validate angle variables like Heading, Head direction, and Heading to Point, but the average value I calculate in Excel does not match the results in EthoVision XT

If you use the ATAN formula, the value is wrong because ATAN uses another convention for the sign of the average sine and cosine of angles. Use instead ATAN2.

The formula for the average in a track is

=DEGREES (ATAN2(AverageCos, AverageSin))

Where AverageCos is the average of Cos values (calculated as =COS(RADIANS(angle)), and AverageSin is the average of Sin values (calculated as =SIN(RADIANS(angle)), and angle is the per-sample value of Heading, Head direction, or Heading to point.

The total distance moved does not always match the mean velocity

When plotting the average velocity and the total distance moved, there should be a linear relationship between the two. In particular:

Average Velocity = Total distance moved / T

Where T is the time interval (e.g. trial, or time bin) within which the samples are used to do the calculations. For example (here the time bin is 1 second):

inset_5801221.jpg 

In some cases the data points deviate from the linear relationship. The reason is that the total distance moved is calculated over the available samples. If some samples within an interval are missing, or in some samples the subject was not found or if the interval is incomplete (for example, the last time bin in a track), then the total distance is underestimated while the average velocity is unaffected. As a result, the mean velocity no longer lies on the straight line, rather, it lies above the line. The mean velocity is higher then expected from the current distance moved. This pattern is therefore an artifact of the variation in the number of samples available for each time interval. In principle, there is nothing wrong with the data, provided that the proportion of missing samples or samples with “subject not found” is low.

I want to analyze Activity to detect freezing in rodents. However, when I plot the data I get lots of Inactive states

This usually happens when the Activity settings in the Detection Settings are too high. For example, the Activity threshold is 20, or Background noise filter is set to more than 3. In such cases the thresholds are so high that almost no video frame the subject is considered Active, even if in the Analysis profile the Active state was defined with low threshold values.

Solution: make a duplicate of your Detection Settings, reduce the Activity threshold and/or the Background noise filter. Check in the video image that purple pixels appear only when the subject moves. Then repeat the tracking with those Detection Settings.

I get wrong statistics of manually-scored behaviors

Problem: I scored a behavior of type “Start-stop”. In the Statistics and Charts page, the frequency of Not [behavior name] is X+1 when it should be X.

Explanation: This occurs when you score a Start-stop behavior until the end of the trial. At the last sample time, the behavior is automatically ended (see Grooming below), and its complementary Not [behavior name] is scored. This results in the additional occurrence of Not [behavior name] in the statistics. However, the statistics of the actual behavior are correct.

inset_901222.jpg 

The statistics result table contains many empty rows or columns

This occurs often when you make multiple data selections. For example, you make a Nest condition to select the time from 12 hours to 24 hours. Then you create time bins of one hour each. The results table also shows the “empty” bins from 0 to 12 hours:

inset_4501223.jpg 

To hide the empty rows/columns:

1.Click the Layout button on the toolbar (or click the Show/Hide button at the top-right corner of the screen and select Layout).

2.In the window that opens, select Hide empty rows or columns.

The statistics result table contains two or more values of a dependent variable for the same trial, arena or subject

inset_101224.jpg 

This may be due to the fact the results are calculated with a data profile containing two or more Results boxes, but the table does not show the corresponding headers. Click the Layout button and add Selection Result, or Arena name, or Subject. See Modify the layout of the results table

The statistics result table does not show the measurement units

This occurs when in the Layout window you place the Variable with detail on the rows and the Statistic with unit on the columns, and vice versa. To solve the issues, place both items on the rows or on the columns. See Modify the layout of the results table

The statistics result table does not appear

Problem: The results table in Trial Statistics or Group statistics and charts shows no headers and no results.

Explanation/Solution: This could happen for example when

The experiment has no data yet.

The data have been completely filtered out in the Data profile. Please check your data selection.

For Group statistics: An independent variable was inserted in the table Layout, and at least one of those groups contains multiple values of that variable.

example  In the Data profile, you group tracks in two groups, Treated and Control. In the Group statistics and charts, you insert the independent variable Rat ID in the Layout, but each group contains many values of this variable (one per subject tested). Therefore, the grouped results cannot be listed properly.

To solve this, either remove the variable from the Layout (Modify the layout of the results table), or in the Data profile group your trials in a different way. See also Trial Statistics result

The Data Preparation Report says “Failed” for some trials

This message occurs in experiments with Deep learning based body point detection. In some cases EthoVision XT fails to review the tracks and fix subject identity swaps. For example, when the two subjects spent most of the trial time in close contact, or the video file was too short to obtain a reliable trained neural network. See a note in Prepare the data in multi-subject trials

The percentage of “Subject not found” does not match the time in the arena

Problem: “Subject not found” gives one value (e.g. 5%) and the total time the animal is in the arena (Cumulative duration% in the Arena) is 96%, while I expect them to be complementary.

Explanation/Solution. In the following example there is a gap of 25 frames of “subject not found”. With 25 frames per second (so 0.04 s per frame), that comes down to a missed sample time of 1 second, which may be for example 0.5% of the total time. That percentage you see in the Trial list. However, when the subject goes missing, EthoVision XT assumes that it is still in the arena in the next 3 frames, before considering it “not in the arena”. In this example, the gap is not 25 frames but 25-3 = 22 frames. Therefore, the total time “not in the arena” is 22*0.04 s = 0.88 s instead of 1 s. Thus, Subject not found and Cumulative duration% in Arena not always match.

The results table contains “?” in many cells

This could indicate that one or more trials are corrupt. However, it is also possible that you edited the tracks and something went wrong with editing.

1.Click Calculate and take note of a trial that gives the “?” results.

2.Go to the Track Editor, select the trial and then click Undo All. Note that this action erases all your edits in that trial.

3.Re-do editing when necessary.

4.Run analysis.

How do I know the time between the starting point of a video and the time that I started tracking?

This applies to cases when you positioned the video later than its starting point and then clicked Start Trial.

1.Export the raw data (Choose Analysis > Export > Raw data).

2.Open the exported file and look at the difference between the value next to Start time and the value next to Video Start time.

I get more zone entries than expected

This applies to In Zone variables where the number of entries is higher than that expected. For example:

This could occur for different reasons:

A common issue is that the center point of the subject moves back and forth around the boundary between zones when the animal moves just on that spot. This overestimates the number of true zone entries. To avoid that, use the Zone exit threshold, in the In Zone dependent variable settings, or use all the three body points to score a zone entry. See In zone

Another reason for an overestimate of zone entries is that the center point is no longer detected in a zone, although the subject is still found. Consider for example this zero maze. The open and closed zones do not cover the arena completely.

inset_4901225.jpg 

The orange part in the figure above is the region of the arena outside the zones. When the center point is detected there, a zone exit is scored. A new zone entry is scored when the center point is found in the zone again. As a result, you could see a train of zone entries like this:

inset_5001226.jpg 

To solve this issue, re-draw the zones in such a way they overlap the entire region of interest within the arena. For example:

inset_5101227.jpg 

The Analysis profile does not list Mobility and Head direction

This occurs when your experiment is set to Number of Subject = 2 and Body Point Detection Technique = Deep learning. In that case the software does not calculate the body contour and the Head direction line.